#ifndef COMPILER_ONLINE
#include "header.cpp"
#endif

bool compareVectors(const vector<int>& v1, const vector<int>& v2) {
    if (v1.size() != v2.size()) return false;
    for (size_t i = 0; i < v1.size(); i++) {
        if (v1[i] != v2[i]) return false;
    }
    return true;
}

void Test1() {
    vector<int> nums1 = {1,2,3,0,0,0};
    vector<int> nums2 = {2,5,6};
    Solution().merge(nums1, 3, nums2, 3);
    vector<int> expected = {1,2,2,3,5,6};
    if (compareVectors(nums1, expected)) {
        std::cout << "Test1 ok!" << std::endl;
    } else {
        std::cout << "Test1 failed!" << std::endl;
    }
}

void Test2() {
    vector<int> nums1 = {1};
    vector<int> nums2 = {};
    Solution().merge(nums1, 1, nums2, 0);
    vector<int> expected = {1};
    if (compareVectors(nums1, expected)) {
        std::cout << "Test2 ok!" << std::endl;
    } else {
        std::cout << "Test2 failed!" << std::endl;
    }
}

void Test3() {
    vector<int> nums1 = {0};
    vector<int> nums2 = {1};
    Solution().merge(nums1, 0, nums2, 1);
    vector<int> expected = {1};
    if (compareVectors(nums1, expected)) {
        std::cout << "Test3 ok!" << std::endl;
    } else {
        std::cout << "Test3 failed!" << std::endl;
    }
}

void Test4() {
    vector<int> nums1 = {4,5,6,0,0,0};
    vector<int> nums2 = {1,2,3};
    Solution().merge(nums1, 3, nums2, 3);
    vector<int> expected = {1,2,3,4,5,6};
    if (compareVectors(nums1, expected)) {
        std::cout << "Test4 ok!" << std::endl;
    } else {
        std::cout << "Test4 failed!" << std::endl;
    }
}

void Test5() {
    vector<int> nums1 = {2,0};
    vector<int> nums2 = {1};
    Solution().merge(nums1, 1, nums2, 1);
    vector<int> expected = {1,2};
    if (compareVectors(nums1, expected)) {
        std::cout << "Test5 ok!" << std::endl;
    } else {
        std::cout << "Test5 failed!" << std::endl;
    }
}

int main() {
    Test1();
    Test2();
    Test3();
    Test4();
    Test5();
    return 0;
}